package collection.myList;

import java.util.ArrayList;
import java.util.List;

public class IsNull {
    public static void main(String[] args) {
        function2();
    }


    private static void function1(){
        List<String> tempGoodsCode = new ArrayList<>();
        List<String> goodsCodes = new ArrayList<>();
        goodsCodes.add("1062709");
        tempGoodsCode.addAll(goodsCodes);
        tempGoodsCode.remove("1062709");

        System.out.println(tempGoodsCode.size());
        if(tempGoodsCode!=null||tempGoodsCode.size()!=0) {
            System.out.println("----");
            for (String item:tempGoodsCode) {
                System.out.println("----:"+item);
            }
        }
    }

    private static void function2(){

        List<String> tempGoodsCode = new ArrayList<>();
        List<String> goodsCodes = new ArrayList<>();
        goodsCodes.add("1062709");
        tempGoodsCode.addAll(goodsCodes);
        tempGoodsCode.remove("1062709");

        List<String> channelGoods = new ArrayList<>();
        List<String> goodsCodes2 = new ArrayList<>();
        for(String goods : goodsCodes){
            //goodsCode ：1062709
            //map.put(goods, goods);
            goodsCodes2.add("1062709");
            for (String goodsCode : goodsCodes2) {
                if("1062709".equals(goodsCode)){
                    tempGoodsCode.remove(goodsCode);
                    //tempGoodsCode = null
                    continue;
                }
            }
        }
        System.out.println(tempGoodsCode.size());
    }
}
